package com.hainatong.jcmvvmbase;


import androidx.fragment.app.Fragment;
import com.hainatong.jcmvvmbase.databinding.ActivityLazyLoadBinding;
import com.hainatong.mvvmbase.base.BaseMvvmActivity;
import com.hainatong.mvvmbase.base.NoViewModel;
import kotlin.jvm.internal.markers.KMutableList;

import java.util.ArrayList;
import java.util.List;

public class LazyLoadActivity extends BaseMvvmActivity<ActivityLazyLoadBinding, NoViewModel>
{

    private MyFragmentPagerAdapter adapter;


    @Override
    protected int getLayoutId()
    {
        return R.layout.activity_lazy_load;
    }

    @Override
    protected int getBindingVariable()
    {
        return 0;
    }


    @Override
    protected void initView()
    {
        List<Fragment> fragmentList = new ArrayList<>();
        fragmentList.add(new NewLazyFragment());
        fragmentList.add(new NewLazyFragment());
        fragmentList.add(new NewLazyFragment());
        adapter = new MyFragmentPagerAdapter(this,fragmentList);

        viewDataBinding.vp2.setAdapter(adapter);
        viewDataBinding.vp2.setOffscreenPageLimit(3);
    }

    @Override
    protected void initData()
    {

    }



    @Override
    protected void onRetryBtnClick()
    {

    }
}
